xen: add an optional string end parameter to parse_bool()
authorJuergen Gross <jgross@suse.com>
Wed, 23 Aug 2017 17:34:00 +0000 (19:34 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 25 Aug 2017 14:11:42 +0000 (16:11 +0200)
commit532dec8e31174ed450adfd36a4b0b41dec27010d
tree81d69c657a541ea394d25685216f74febd6f20e0
parentbfd19435bca21d3e6c2cfcbb02a143e0e397e7b3
xen: add an optional string end parameter to parse_bool()

Add a parameter to parse_bool() to specify the end of the to be
parsed string. Specifying it as NULL will preserve the current
behavior to parse until the end of the input string, while passing
a non-NULL pointer will specify the first character after the input
string.

This will allow to parse boolean sub-strings without having to
write a NUL byte into the input string.

Modify all users of parse_bool() to pass NULL for the new parameter.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
13 files changed:
xen/arch/arm/acpi/boot.c
xen/arch/x86/cpu/vpmu.c
xen/arch/x86/mm.c
xen/arch/x86/nmi.c
xen/arch/x86/psr.c
xen/arch/x86/setup.c
xen/arch/x86/x86_64/mmconfig-shared.c
xen/common/kernel.c
xen/drivers/char/console.c
xen/drivers/cpufreq/cpufreq.c
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/vtd/quirks.c
xen/include/xen/lib.h